﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tree.ConsoleApp
{
    /// <summary>
    /// 节点
    /// </summary>
    public class Node<T>
    {
        public T Data { get; set; }
        public Node<T> LChild { get; set; }
        public Node<T> RChild { get; set; }
        public Node(T val, Node<T> lp, Node<T> rp)
        {
            Data = val;
            LChild = lp;
            RChild = rp;
        }

        public Node(Node<T> lp, Node<T> rp)
        {
            Data = default(T);
            LChild = lp;
            RChild = rp;
        }

        public Node(T val)
        {
            Data = val;
            LChild = null;
            RChild = null;
        }
        public Node()
        {
            Data = default(T);
            LChild = null;
            RChild = null;
        }
    }
}
